# -*- coding: utf-8 -*-
# @Time    : 2024/8/30 下午2:27
# @Author  : wb
# @Email   : wb@163.com
# @File    : client_page
# @Software: PyCharm

from time import sleep
from pages.wb_base_page import BasePage
from selenium.webdriver.common.by import By


class ClientCarePage(BasePage):
    url = '/crm'
    # 定位器
    '''获取新建关怀按钮元素'''
    new_care_locator = (By.CSS_SELECTOR, 'body > div.container > div.row > div:nth-child(1) > div > a')

    '''获取编辑按钮元素'''
    modify_care_locator = (By.CSS_SELECTOR, '#form1 > table > tbody > tr > td:nth-child(7) > a:nth-child(2)')

    # 浏览器操作
    def click_client_new_care(self):
        # 点击新建关怀
        self.driver.find_element(*self.new_care_locator).click()
        sleep(2)
    def clik_modify(self):
        # 点击编辑
        self.driver.find_element(*self.modify_care_locator).click()
    sleep(2)